const {
  merge
} = require('webpack-merge')
const webpackCommon = require('./webpack.common')
const HtmlWebpackPlugin = require('Html-webpack-plugin')

module.exports = merge(webpackCommon, {
  mode: 'development',
  devtool: 'cheap-source-map',
  devServer: {
    hot: true,
    publicPath: '/'
  },
  plugins: [
    new HtmlWebpackPlugin({
      filename: 'index.html',
      template: 'public/index.html',
      inject: true,
      title: '作业2-2',
      templateParameters: {
        BASE_URL: '/'
      }
    })
  ]
})